home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: dd.chalmers.se!news.chalmers.se!sunic!EU.net!howland.reston.ans.net!gatech!concert!sas!mozart.unx.sas.com!walker
- From: walker@twix.unx.sas.com (Doug Walker)
- Subject: Re: interrupt in SAS/C 6.51
- Originator: walker@twix.unx.sas.com
- Sender: news@unx.sas.com (Noter of Newsworthy Events)
- Message-ID: <CMAttx.Ltn@unx.sas.com>
- Date: Mon, 7 Mar 1994 14:34:41 GMT
- References: <1994Mar6.035403.28339@cdf.toronto.edu>
- Nntp-Posting-Host: twix.unx.sas.com
- Organization: SAS Institute Inc.
- Lines: 45
-
-
- In article <1994Mar6.035403.28339@cdf.toronto.edu>, a228grai@cdf.toronto.edu (Darrell Grainger) writes:
- |> Now if I create the function VertBServer using assembler I can get this to
- |> work fine but what I would like to do (and this is just for experimental
- |> purposes) is create the function VertBServer using C language. The code
- |> for VertBServer is simply:
- |>
- |> Signal(task, SIGBREAKF_CTRL_F);
- |>
- |> The variable task is a global variable initialized by the main code using:
- |>
- |> task = FindTask(NULL);
- |>
- |> I've read some stuff about __interrupt in the SAS/C manual but it is not
- |> entirely clear. I think I am probably not setting the Z flag when exiting
- |> the VertBServer function. References to the manuals would actually be
- |> appreciated.
-
- How about this?
-
- struct Task *task;
-
- void __interrupt __saveds VertBServer(void)
- {
- Signal(task, SIGBREAKF_CTRL_F);
- }
-
- or just add __far to the definition of the extern and you can do
- away with the __saveds keyword on the function.
-
- What's probably happening is that register A4 is not set up to
- point to your near data section. Globals are by default accessed
- relative to A4 (NEAR data). You can either add the __saveds keyword
- to set up register A4, or you can access the global with FAR data
- accessing by adding the __far keyword to it.
-